
const EntitySchema = require("typeorm").EntitySchema;
const Photo = require('../model/Photo').Photo;

module.exports = new EntitySchema({
    name: "Photo",
    target: Photo,
    columns: {
        id: {
            primary: true,
            type: "int",
            generated: true
        },
        name: {
            type: "varchar"
        },
        description: {
            type: "text"
        },
        filename: {
            type: "varchar"
        },
        views: {
            type: "varchar"
        },
        isPublished: {
            type: "boolean"
        }
    }
});